import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';
//单条查询
export const queryGeneralFlowProcessCcRecord = (params) => {
  params.head.transCode = 'queryGeneralFlowProcessCcRecord';
  return request({
    url: '/general/generalFlowProcessCcRecord/queryGeneralFlowProcessCcRecord',
    method: 'post',
    data: params
  })
}
//多条列表查询，支持条件查询
export const queryGeneralFlowProcessCcRecordListPage = (params) => {
  params.head.transCode = 'queryGeneralFlowProcessCcRecordListPage';
  return request({
    url: '/general/generalFlowProcessCcRecord/queryGeneralFlowProcessCcRecordListPage',
    method: 'post',
    data: params
  })
}
//新增单条记录
export const saveGeneralFlowProcessCcRecord = (params) => {
  params.head.transCode = 'saveGeneralFlowProcessCcRecord';
  return request({
    url: '/general/generalFlowProcessCcRecord/saveGeneralFlowProcessCcRecord',
    method: 'post',
    data: params
  })
}
//新增多条记录
export const saveGeneralFlowProcessCcRecordList = (params) => {
  params.head.transCode = 'saveGeneralFlowProcessCcRecordList';
  return request({
    url: '/general/generalFlowProcessCcRecord/saveGeneralFlowProcessCcRecordList',
    method: 'post',
    data: params
  })
}
//新增或修改单条记录
export const saveOrUpdateGeneralFlowProcessCcRecord = (params) => {
  params.head.transCode = 'saveOrUpdateGeneralFlowProcessCcRecord';
  return request({
    url: '/general/generalFlowProcessCcRecord/saveOrUpdateGeneralFlowProcessCcRecord',
    method: 'post',
    data: params
  })
}


//新增或修改单条记录
export const saveOrUpdateGeneralFlowProcessCcRecordList = (params) => {
  params.head.transCode = 'saveOrUpdateGeneralFlowProcessCcRecordList';
  return request({
    url: '/general/generalFlowProcessCcRecord/saveOrUpdateGeneralFlowProcessCcRecordList',
    method: 'post',
    data: params
  })
}

//修改单条记录
export const updateGeneralFlowProcessCcRecord = (params) => {
  params.head.transCode = 'updateGeneralFlowProcessCcRecord';
  return request({
    url: '/general/generalFlowProcessCcRecord/updateGeneralFlowProcessCcRecord',
    method: 'post',
    data: params
  })
}

//删除单条记录
export const deleteGeneralFlowProcessCcRecord = (params) => {
  params.head.transCode = 'deleteGeneralFlowProcessCcRecord';
  return request({
    url: '/general/generalFlowProcessCcRecord/deleteGeneralFlowProcessCcRecord',
    method: 'post',
    data: params
  })
}

//删除多条记录
export const deleteGeneralFlowProcessCcRecordList = (params) => {
  params.head.transCode = 'deleteGeneralFlowProcessCcRecordList';
  return request({
    url: '/general/generalFlowProcessCcRecord/deleteGeneralFlowProcessCcRecordList',
    method: 'post',
    data: params
  })
}
//导出excel
export const exportGeneralFlowProcessCcRecordExcel = (params) => {
  downloadExcel({
    url: '/general/generalFlowProcessCcRecord/excelDownload/exportGeneralFlowProcessCcRecordExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
